#include "matrixOps.h"

qreal MatrixTrace(gsl_matrix *X) {
    qreal ret = 0.0;
    uint mx = (X->size1 >= X->size2) ? X->size2 : X->size1;

    for(uint i=0;i<mx;i++)
        ret += gsl_matrix_get(X,i,i);

    return ret;
}
